package pers.mine.po;

import java.util.Date;

import javax.validation.constraints.Min;
import javax.validation.constraints.Past;

import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;
import org.springframework.format.annotation.DateTimeFormat;

public class Member {
	@Min(value = 1000)
	private Integer id;
	@NotBlank
	@Length(max = 30, min = 2)
	private String name;
	@NotBlank
	@Length(max = 20, min = 4)
	private String pw;

	private String icon;

	@NotBlank
	private String sex;
	@Past
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	private Date birthday;

	private Double balance;
	@NotBlank
	private String address;
	@NotBlank
	private String tel;
	@NotBlank
	private String desc;

	private Integer state;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPw() {
		return pw;
	}

	public void setPw(String pw) {
		this.pw = pw;
	}

	public String getIcon() {
		return icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}

	public Date getBirthday() {
		return birthday;
	}

	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}

	public Double getBalance() {
		return balance;
	}

	public void setBalance(Double balance) {
		this.balance = balance;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getTel() {
		return tel;
	}

	public void setTel(String tel) {
		this.tel = tel;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

	public Integer getState() {
		return state;
	}

	public void setState(Integer state) {
		this.state = state;
	}

	@Override
	public String toString() {
		return "Member [id=" + id + ", name=" + name + ", pw=" + pw + ", icon="
				+ icon + ", sex=" + sex + ", birthday=" + birthday
				+ ", balance=" + balance + ", address=" + address + ", tel="
				+ tel + ", desc=" + desc + ", state=" + state + "]";
	}
}